package ${packageCode}.api

import groovy.util.logging.Log4j2
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.ResponseBody
import top.cardone.context.ApplicationContextHolder
import top.cardone.web.support.WebSupport

import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

@Log4j2
@Controller
class CommonController {
    @RequestMapping(value = "/**/*")
    @ResponseBody
    Object all(HttpServletRequest request, HttpServletResponse response) {
        ApplicationContextHolder.getBean(WebSupport.class).func(request, response, request.getServletPath(), !log.isDebugEnabled())
    }
}